/*
  +----------------------------------------------------------------------+
  | PHP Version 5                                                        |
  +----------------------------------------------------------------------+
  | Copyright (c) 1997-2010 The PHP Group                                |
  +----------------------------------------------------------------------+
  | This source file is subject to version 3.01 of the PHP license,      |
  | that is bundled with this package in the file LICENSE, and is        |
  | available through the world-wide-web at the following url:           |
  | http://www.php.net/license/3_01.txt                                  |
  | If you did not receive a copy of the PHP license and are unable to   |
  | obtain it through the world-wide-web, please send a note to          |
  | license@php.net so we can mail you a copy immediately.               |
  +----------------------------------------------------------------------+
  | Author: David Soria Parra <david.soria_parra@mayflower.de>           |
  +----------------------------------------------------------------------+
*/

/* $Id: $ */

#ifndef MYSQLND_UH_H
#define MYSQLND_UH_H

#ifdef ZTS
#include "TSRM.h"
#endif


#ifdef PHP_WIN32
#define PHP_MYSQLND_UH_API __declspec(dllexport)
#else
# if defined(__GNUC__) && __GNUC__ >= 4
#  define PHP_MYSQLND_UH_API __attribute__ ((visibility("default")))
# else
#  define PHP_MYSQLND_UH_API
# endif
#endif

#define PHP_MYSQLND_UH_EXPORT(__type) PHP_MYSQLND_UH_API __type

extern const zend_function_entry mysqlnd_uh_functions[3];

/*
	MySQLnd Plugin related
*/
#include "ext/mysqlnd/mysqlnd.h"
#include "ext/mysqlnd/mysqlnd_debug.h"

/* mysqlnd plugin id */
extern unsigned int mysqlnd_uh_plugin_id;

/* function handler tables */
/* the build in mysqlnd_uh_connection class shall be able to call mysqlnd handler */
extern struct st_mysqlnd_conn_methods org_mysqlnd_conn_methods;

/* data which we will associate with a mysqlnd connection */
typedef struct st_mysqlnd_uh_conn_data {
	zval* user_obj;
	zval* conn_resource;
	char* userland_conn_id;
} MYSQLND_UH_CONN_DATA;

void mysqlnd_uh_minit_register_hooks(TSRMLS_D);

#endif	/* MYSQLND_UH_H */

/*
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 * vim600: noet sw=4 ts=4 fdm=marker
 * vim<600: noet sw=4 ts=4
 */
